<!DOCTYPE html>
<html>
<head>
    

    

    



    <meta charset="utf-8">
    
    
    
    
    <title>移动端开发时遇到的一些坑 | Anson&#39;s Blog | 种一棵树最好的时间在十年前，其次是现在。</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="JavaScript,移动端">
    <meta name="description" content="起点中文网demo_移动端 做时遇到的bug一、移动端轮播1.touchstart 手指触摸 == mousedown2.touchend 手指抬起 == mouseup3.touchmove 手指抬起 == mousmovetouch事件  在 chrome的模拟器下，部分版本 通过on的方式来添加事件无效所以在移动端一般都使用如下方式addEventListener(“事件名”,函数,冒泡或捕">
<meta name="keywords" content="JavaScript,移动端">
<meta property="og:type" content="article">
<meta property="og:title" content="移动端开发时遇到的一些坑">
<meta property="og:url" content="http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/index.html">
<meta property="og:site_name" content="Anson&#39;s Blog">
<meta property="og:description" content="起点中文网demo_移动端 做时遇到的bug一、移动端轮播1.touchstart 手指触摸 == mousedown2.touchend 手指抬起 == mouseup3.touchmove 手指抬起 == mousmovetouch事件  在 chrome的模拟器下，部分版本 通过on的方式来添加事件无效所以在移动端一般都使用如下方式addEventListener(“事件名”,函数,冒泡或捕">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2018-10-19T09:14:18.604Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="移动端开发时遇到的一些坑">
<meta name="twitter:description" content="起点中文网demo_移动端 做时遇到的bug一、移动端轮播1.touchstart 手指触摸 == mousedown2.touchend 手指抬起 == mouseup3.touchmove 手指抬起 == mousmovetouch事件  在 chrome的模拟器下，部分版本 通过on的方式来添加事件无效所以在移动端一般都使用如下方式addEventListener(“事件名”,函数,冒泡或捕">
    
        <link rel="alternate" type="application/atom+xml" title="Anson&#39;s Blog" href="/atom.xml">
    
    <link rel="shortcut icon" href="/img/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu"  >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="https://yscoder.github.io/img/face.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">张宁乐</h5>
          <a href="mailto:zhangningle2017@gmail.com" title="zhangningle2017@gmail.com" class="mail">zhangningle2017@gmail.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                归档
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/about"  >
                <i class="icon icon-lg icon-user"></i>
                关于
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/ansonznl" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">移动端开发时遇到的一些坑</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">移动端开发时遇到的一些坑</h1>
        <h5 class="subtitle">
            
                <time datetime="2018-02-19T00:32:07.000Z" itemprop="datePublished" class="page-time">
  2018-02-19
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#起点中文网demo-移动端-做时遇到的bug"><span class="post-toc-number">1.</span> <span class="post-toc-text">起点中文网demo_移动端 做时遇到的bug</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#一、移动端轮播"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">一、移动端轮播</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#二、滚动条"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">二、滚动条</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#三、修改input-中placeholder字体颜色"><span class="post-toc-number">1.3.</span> <span class="post-toc-text">三、修改input 中placeholder字体颜色</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#四、清除a、button的默认跳转"><span class="post-toc-number">1.4.</span> <span class="post-toc-text">四、清除a、button的默认跳转</span></a></li></ol></li></ol>
        </nav>
    </aside>


<article id="post-移动端开发时遇到的一些坑"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">移动端开发时遇到的一些坑</h1>
        <div class="post-meta">
            <time class="post-time" title="2018-02-19 08:32:07" datetime="2018-02-19T00:32:07.000Z"  itemprop="datePublished">
2018-02-19
<!--2018-10-19 17:14:18-->
</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h2 id="起点中文网demo-移动端-做时遇到的bug"><a href="#起点中文网demo-移动端-做时遇到的bug" class="headerlink" title="起点中文网demo_移动端 做时遇到的bug"></a>起点中文网demo_移动端 做时遇到的bug</h2><h3 id="一、移动端轮播"><a href="#一、移动端轮播" class="headerlink" title="一、移动端轮播"></a>一、移动端轮播</h3><p>1.touchstart 手指触摸 == mousedown<br>2.touchend 手指抬起 == mouseup<br>3.touchmove 手指抬起 == mousmove<br>touch事件  在 chrome的模拟器下，部分版本 通过on的方式来添加事件无效<br>所以在移动端一般都使用如下方式<br>addEventListener(“事件名”,函数,冒泡或捕获);<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">document.addEventListener(&apos;touchstart&apos;,function(ev)&#123;</span><br><span class="line">    ev.preventDefault();</span><br><span class="line">&#125;);</span><br><span class="line">var box=document.getElementById(&quot;box&quot;);</span><br><span class="line">box.addEventListener(&apos;touchstart&apos;,function()&#123;</span><br><span class="line">    this.innerHTML=&apos;手指按下了&apos;;</span><br><span class="line">&#125;);</span><br><span class="line">box.addEventListener(&apos;touchmove&apos;,function()&#123;</span><br><span class="line">    this.innerHTML=&apos;手指移动了&apos;;</span><br><span class="line">&#125;);</span><br><span class="line">box.addEventListener(&apos;touchend&apos;,function()&#123;</span><br><span class="line">    this.innerHTML=&apos;手指离开了&apos;;</span><br><span class="line">&#125;);</span><br></pre></td></tr></table></figure></p>
<p>参考<a href="http://www.qdfuns.com/notes/37602/5901a1994c6f69d213da2aef82aa1d8d.html" target="_blank" rel="noopener">前端网</a><br>移动端事件demo <a href="http://ansonznl.coding.me/Mobile-demo/%E7%A7%BB%E5%8A%A8%E4%BA%8B%E4%BB%B601.html" target="_blank" rel="noopener">http://ansonznl.coding.me/Mobile-demo/%E7%A7%BB%E5%8A%A8%E4%BA%8B%E4%BB%B601.html</a></p>
<h3 id="二、滚动条"><a href="#二、滚动条" class="headerlink" title="二、滚动条"></a>二、滚动条</h3><p><strong>scrollTop为滚动条在Y轴上的滚动距离。<br>clientHeight为内容可视区域的高度。<br>scrollHeight为内容可视区域的高度加上溢出（滚动）的距离。</strong><br>从这个三个属性的介绍就可以看出来，滚动条到底部的条件即为scrollTop + clientHeight == scrollHeight。<br>废话不多少说，赶紧上代码（兼容不同的浏览器）。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line">//滚动条在Y轴上的滚动距离</span><br><span class="line">function getScrollTop()&#123;</span><br><span class="line">　　var scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0;</span><br><span class="line">　　if(document.body)&#123;</span><br><span class="line">　　　　bodyScrollTop = document.body.scrollTop;</span><br><span class="line">　　&#125;</span><br><span class="line">　　if(document.documentElement)&#123;</span><br><span class="line">　　　　documentScrollTop = document.documentElement.scrollTop;</span><br><span class="line">　　&#125;</span><br><span class="line">　　scrollTop = (bodyScrollTop - documentScrollTop &gt; 0) ? bodyScrollTop : documentScrollTop;</span><br><span class="line">　　return scrollTop;</span><br><span class="line">&#125;</span><br><span class="line">//文档的总高度</span><br><span class="line">function getScrollHeight()&#123;</span><br><span class="line">　　var scrollHeight = 0, bodyScrollHeight = 0, documentScrollHeight = 0;</span><br><span class="line">　　if(document.body)&#123;</span><br><span class="line">　　　　bodyScrollHeight = document.body.scrollHeight;</span><br><span class="line">　　&#125;</span><br><span class="line">　　if(document.documentElement)&#123;</span><br><span class="line">　　　　documentScrollHeight = document.documentElement.scrollHeight;</span><br><span class="line">　　&#125;</span><br><span class="line">　　scrollHeight = (bodyScrollHeight - documentScrollHeight &gt; 0) ? bodyScrollHeight : documentScrollHeight;</span><br><span class="line">　　return scrollHeight;</span><br><span class="line">&#125;</span><br><span class="line">//浏览器视口的高度</span><br><span class="line">function getWindowHeight()&#123;</span><br><span class="line">　　var windowHeight = 0;</span><br><span class="line">　　if(document.compatMode == &quot;CSS1Compat&quot;)&#123;</span><br><span class="line">　　　　windowHeight = document.documentElement.clientHeight;</span><br><span class="line">　　&#125;else&#123;</span><br><span class="line">　　　　windowHeight = document.body.clientHeight;</span><br><span class="line">　　&#125;</span><br><span class="line">　　return windowHeight;</span><br><span class="line">&#125;</span><br><span class="line">window.onscroll = function()&#123;</span><br><span class="line">　　if(getScrollTop() + getWindowHeight() == getScrollHeight())&#123;</span><br><span class="line">　　　　alert(&quot;you are in the bottom!&quot;);</span><br><span class="line">　　&#125;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure></p>
<h3 id="三、修改input-中placeholder字体颜色"><a href="#三、修改input-中placeholder字体颜色" class="headerlink" title="三、修改input 中placeholder字体颜色"></a>三、修改input 中placeholder字体颜色</h3><p>以前都不知道能修改，百度一下才知道是可以的<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">::-webkit-input-placeholder &#123; /* WebKit browsers */</span><br><span class="line">　　color:#999;</span><br><span class="line">　　&#125;</span><br><span class="line">　　:-moz-placeholder &#123; /* Mozilla Firefox 4 to 18 */</span><br><span class="line">　　color:#999;</span><br><span class="line">　　&#125;</span><br><span class="line">　　::-moz-placeholder &#123; /* Mozilla Firefox 19+ */</span><br><span class="line">　　color:#999;</span><br><span class="line">　　&#125;</span><br><span class="line">　　:-ms-input-placeholder &#123; /* Internet Explorer 10+ */</span><br><span class="line">　　color:#999;</span><br><span class="line">　　&#125;</span><br></pre></td></tr></table></figure></p>
<h3 id="四、清除a、button的默认跳转"><a href="#四、清除a、button的默认跳转" class="headerlink" title="四、清除a、button的默认跳转"></a>四、清除a、button的默认跳转</h3><p>比如说登录时，账号和密码不填时不能点登录，节省js判断，或者有时候不想让a标签跳转可以用到<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">&lt;button disabled=&quot;disabled&quot; id=&quot;btn&quot;&gt;登录&lt;/button&gt;</span><br><span class="line">/* 添加disabled属性后不会提交数据 */</span><br><span class="line">&lt;a href=&quot;javascript:&quot; class=&quot;borlenone phb_nav&quot;&gt;风云榜&lt;/a&gt;</span><br><span class="line">/* 在a的href添加javascript:;属性后不会跳转 */</span><br></pre></td></tr></table></figure></p>
<p>做完了起点中文网的移动端后对移动网页的制作有加深一些，对于js的运用也熟练了许多，自己也封装了一个选项卡方法，，对于html、css的一些属性更了解了，<br>总而言之收获恒很大。现在移动端浏览器兼容还是有点问题。<br>加油，<br>最后放上<a href="https://ansonznl.coding.me/QiDian/" target="_blank" rel="noopener">起点中文网demo</a></p>
<p><strong>后续加：</strong><br>写大连罗森（移动端）的时候居然发现过了个年回来很多代码都生疏了，<br>在写的过程中发现一些问题，在此记录下来以防在犯。</p>
<ul>
<li>做的时候主要使用rem布局，rem用熟练了以后确实方便很多，做的时候也遇到过一些问题，在此记录一下。</li>
<li>一个页面插入多个swiper<br>写的首页的时候，首页需要加两个轮播图，并且结构上不一样，我就引入了一个swiper。<br>问题：在写首页的时候遇到了一个问题，就是点击一个轮播图的按钮时候，另一个也跟着动，<br>思考：我就想，这肯定不行啊，然后晚上回去就开始研究，发现它其实就是class一样，所以调用的function一样，从而导致的2个轮播一起轮播，<br>解决方案：给第一个轮播的按钮重新命名一个新的class，并且调用同一个function，完美解决！</li>
<li>img加宽高<br>这个写完后台测试时才发现的问题，导致前期给后台大哥填了很多麻烦，还是给img标签加上高和宽比较好。这样的话，图片显示出来就会按照设定好的尺寸，不会出现意外情况。但如果没有设定，很有可能会出现图片上边有白条，或者没有按照想要的效果显示，网站更新是换图片会出现问题。我碰到的就是没有加宽高，造成了图片下沉，上面出现白条。<br>网页中的img最好使用div包起来，或者把img的display属性设为block，可以消除img的默认边距<br>记忆比较深刻的就是这么两个问题，<br>最后放上演示地址（建议手机浏览）：<a href="http://zhangningle.gitee.io/m.luosen/" target="_blank" rel="noopener">http://zhangningle.gitee.io/m.luosen/</a></li>
</ul>

        </div>

        <blockquote class="post-copyright">
    
    <footer>
        <a href="http://yoursite.com">
            <img src="https://yscoder.github.io/img/face.jpg" alt="张宁乐">
            张宁乐
        </a>
    </footer>
</blockquote>

        


        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JavaScript/">JavaScript</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/移动端/">移动端</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/&title=《移动端开发时遇到的一些坑》 — Anson's Blog&pic=https://yscoder.github.io/img/face.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/&title=《移动端开发时遇到的一些坑》 — Anson's Blog&source=张宁乐,博客" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《移动端开发时遇到的一些坑》 — Anson's Blog&url=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2018/02/22/小程序学习记录一/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">小程序学习记录一</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2018/01/24/使用Gulp和学习Sass语法/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">使用Gulp和学习Sass语法</h4>
      </a>
    </div>
  
</nav>



    











    <!-- Valine Comments -->
    <div class="comments vcomment" id="comments"></div>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>
    <!-- Valine Comments script -->
    <script>
        var GUEST_INFO = ['nick','mail','link'];
        var guest_info = 'nick,mail'.split(',').filter(function(item){
          return GUEST_INFO.indexOf(item) > -1
        });
        new Valine({
            el: '#comments',
            notify: 'false' == 'true',
            verify: 'false' == 'true',
            appId: "gbSwUaucLkuxqOLxm131Mg9U-gzGzoHsz",
            appKey: "b9xU2qIPrm06S0uymbAfrGMD",
            avatar: "mm",
            placeholder: "要不要说点什么？",
            guest_info: guest_info.length == 0 ? GUEST_INFO : guest_info,
            pageSize: "10"
        })
    </script>
    <!-- Valine Comments end -->







</article>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>张宁乐 &copy; 2017 - 2019</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
			<span>
					Hosted by <a href="https://pages.coding.me" style="font-weight: bold">Coding Pages</a>
			  </span>
        </p>
    </div>
</footer>
<!-- <script>
(function(){
    var bp = document.createElement("script");
    var curProtocol = window.location.protocol.split(":")[0];
    if (curProtocol === "https") {
        bp.src = "https://zz.bdstatic.com/linksubmit/push.js";
    }
    else {
        bp.src = "http://push.zhanzhang.baidu.com/push.js";
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script> -->

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/&title=《移动端开发时遇到的一些坑》 — Anson's Blog&pic=https://yscoder.github.io/img/face.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/&title=《移动端开发时遇到的一些坑》 — Anson's Blog&source=张宁乐,博客" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《移动端开发时遇到的一些坑》 — Anson's Blog&url=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2018/02/19/移动端开发时遇到的一些坑/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: false };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>





</body>
</html>
